/**
 * Created by 周颖 on 2017/7/26.
 *
 * axios post请求默认提交的是JSON,如果需要提交 application/x-www-form-urlencoded =>
 * 1、引入 import queryString from 'querystring';
 * 2、参数 queryString.stringify(para)
 * [参考](https://github.com/mzabriskie/axios#using-applicationx-www-form-urlencoded-format)
 *
 *
 * [接口地址](http://59.107.26.181:8086/swagger-ui.html)
 */

import axios from 'axios';
import queryString from 'querystring';

let api = {
  ADdetail: '/api-active/v1/api/app/startpage/backend/detail',
  ADstore: '/api-active/v1/api/app/startpage/backend/store'
}

const ADdetail = (parm) => {
  return axios.get(api.ADdetail, {params: parm})
}

const ADstore = (parm) => {
  console.log(parm);
  return axios.post(api.ADstore, parm)
}

export {
    api,
    ADdetail,
    ADstore
}
